/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eyrolles.action;

import eyrolles.Employe;
import eyrolles.Employe;
import eyrolles.form.EmployeForm;
import eyrolles.form.EmployeForm;
import eyrolles.EyrollesModele;
import java.sql.Connection;
import org.apache.struts.action.Action;
import org.apache.struts.actions.DispatchAction;

/**
 *
 * @author Nairo
 */
public class CotationsAction extends DispatchAction {

    private EyrollesModele model = null;
    
    public EyrollesModele getModel() {
        return model;
    }
    
    public void setModel(EyrollesModele model){
        this.model = model;
    }

    protected Employe getEmployeFromEmployeForm(EmployeForm eForm) {
        Employe employe = new Employe();
        employe.setUsername(eForm.getUsername());
        employe.setName(eForm.getName());
        employe.setEmail(eForm.getEmail());
        employe.setPhone(eForm.getPhone());
        employe.setDepid(Integer.parseInt(eForm.getDepid()));
        employe.setRoleid(Integer.parseInt(eForm.getRoleid()));

        return employe;
    }
}
